home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 120 / 120.d81 / chile chal (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  288 lines

  1. 10 poke52,56:poke51,0:poke56,56:poke55,0:clr
  2. 20 dv=peek(186):ifdv<8thendv=8
  3. 30 poke53281,0:poke53280,0
  4. 40 print"[147]":poke53272,23:gosub2050
  5. 50 dimgr(13,4),gx(13,4),gy(13,4),x(13),y(13),n(18)
  6. 60 sys57812"chile font",dv,0:poke780,0:poke781,0:poke782,56:sys65493
  7. 70 sys57812"wnd/inp/cm/ind",dv,0:poke780,0:poke781,0:poke782,192:sys65493
  8. 72 sys57812"chile sfx",dv,0:poke780,0:poke781,0:poke782,201:sys65493
  9. 76 sd=201*256:sys sd:syssd+12
  10. 80 poke53265,11:poke53272,31
  11. 90 up=49152  :rem scroll up
  12. 100 dn=up+3   :rem scroll down
  13. 110 cm=50432  :rem copymem
  14. 120 goto360
  15. 127 :
  16. 128 :rem store screen
  17. 129 :
  18. 130 sys cm,1024,20480+bu*2000,1000
  19. 140 sys cm,55296,21480+bu*2000,1000
  20. 150 return
  21. 157 :
  22. 158 :rem restore screen
  23. 159 :
  24. 160 sys cm,20480+bu*2000,1024,1000
  25. 170 sys cm,21480+bu*2000,55296,1000
  26. 180 return
  27. 187 :
  28. 188 :rem move chile routine
  29. 189 :
  30. 190 poke214,gy(x(c),y(c)):print:printtab(gx(x(c),y(c)))cg$
  31. 200 poke214,hq:print:printtab(j*3+hd)ch$"[145][157][157]"chr$(c+192)
  32. 202 syssd+9,sq
  33. 210 gr(j,k)=gr(x(c),y(c)):gr(x(c),y(c))=0:x(c)=j:y(c)=k
  34. 220 return
  35. 227 :
  36. 228 :rem print ms$
  37. 229 :
  38. 230 poke781,24:sys59903
  39. 240 poke214,23:print"[155]":printtab(20-len(ms$)/2)ms$""
  40. 250 return
  41. 257 :
  42. 258 :rem wiggle scales
  43. 259 :
  44. 260 syssd+9,2:fori=0to2
  45. 270 sysdn,1,4,18,6,0
  46. 280 sysup,21,3,18,6,0:poke214,7:print:printtab(28)mt$
  47. 290 sysup,1,4,18,6,0
  48. 300 sysdn,21,3,18,6,0:poke214,8:print:printtab(8)mt$
  49. 310 sysup,1,3,18,6,0
  50. 320 sysdn,21,4,18,6,0:poke214,7:print:printtab(8)mt$
  51. 330 sysdn,1,3,18,6,0
  52. 340 sysup,21,4,18,6,0:poke214,8:print:printtab(28)mt$
  53. 350 next:return
  54. 357 :
  55. 358 :rem setup
  56. 359 :
  57. 360 bg$="@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
  58. 370 ch$=" [149][160][157][157][161] [162][157][157][157][163] [164][157][157][157][165][166][167]"
  59. 380 cg$="   [157][157][157]   [157][157][157]   [157][157][157]   "
  60. 390 ci$=" [160][157][157][161] [162][157][157][157][163] [164][157][157][157][165][166][167]"
  61. 400 pl$="[158]#$              %&"
  62. 410 mt$="[155]_[152]__[151]_"
  63. 420 nu$="[152][172][198]2[146][187][157][157][157][157]____[157][157][157][157][188]__[190]"
  64. 430 nu$(1)="[152]:;[157][157]<=":nu$(2)="[152][180][181][157][157][182][183]":nu$(3)="[152][184][185][157][157][186][187]"
  65. 440 i=rnd(-ti)
  66. 450 v(0)=-.1:v(1)=.1:v$(0)="[204]ight":v$(1)="[200]eavy"
  67. 460 fori=0to2:forj=0to11:readgx(j,i),gy(j,i):next:next
  68. 470 data1,3,4,3,7,3,10,3,13,3,16,3,21,3,24,3,27,3,30,3,33,3,36,3
  69. 480 data1,14,4,14,7,14,10,14,13,14,16,14,20,14,23,14,26,14,30,14,33,14,36,14
  70. 490 data1,18,4,18,7,18,10,18,13,18,16,18,20,18,23,18,26,18,30,18,33,18,36,18
  71. 500 gosub1650
  72. 507 :
  73. 508 :rem game screen
  74. 509 :
  75. 510 poke53265,11:print"[147]  [176][174][176][174][174][174][176][176][174][176][174][176][174][176]\[176][174]
  76. 520 [153]"  (NULL)-<(NULL)-<(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)/^printchilechallenge"
  77. 530 [153]"  /expexp//expexp//exp/expexp/exp/exp
  78. 540 poke214,7:print:print""pl$""pl$
  79. 550 fori=1to3
  80. 560 printtab(8)mt$tab(28)mt$
  81. 570 next
  82. 580 printtab(9)"[145][152][198]1"tab(29)"[198]3"
  83. 590 printtab(8)"[155][188][152]__[151]_[152]________________[155]_[152]__[151][190]"
  84. 600 printtab(18)"[145][145]"nu$
  85. 610 poke214,13:print:printtab(19)"[145][145]"nu$(1)
  86. 620 print"[149][176][192][192][192][192][192][192][179][155][211][208][193][195][197][149][171][192][192][192][192][192][178][192][192][192][179][155][198]5[149][171][192][192][178][192][192][192][179][155][198]7[149][171][192][192][174]";
  87. 630 fori=1to8:print"[221]                  [221]         [221]         [221]";:next
  88. 640 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][189]";
  89. 650 fori=217to242:pokei,peek(i)or128:next
  90. 660 fori=1to6:poke214,14:print:printtab(i*3-2)ch$;:print"[145][157][157]"chr$(192+i)
  91. 670 poke214,18:print:printtab(i*3-2)ch$;:print"[145][157][157]"chr$(198+i):next
  92. 680 poke53265,27
  93. 687 :
  94. 688 :rem setup arrays/variables
  95. 689 :
  96. 690 fori=0to2:forj=0to11:gr(j,i)=0:next:next
  97. 700 fori=1to2:forj=0to5:gr(j,i)=1:next:next
  98. 710 fori=1to6:x(i)=i-1:y(i)=1:x(i+6)=i-1:y(i+6)=2:next
  99. 720 u=int(rnd(0)*12):uu=int(rnd(0)*2)
  100. 730 ifu>5thengr(u-6,2)=1+v(uu):goto750
  101. 740 gr(u,1)=1+v(uu)
  102. 750 w=1:ww=0:n=0
  103. 760 print""
  104. 762 ms$="[193] to [204]   [198]-keys/[211][208][193][195][197]   [205] - [205]enu":gosub230
  105. 767 :
  106. 768 :rem main loop
  107. 769 :
  108. 770 geta$:ifa$=""then770
  109. 780 ifa$="[137]"then1330
  110. 790 ifa$<>"m"then800
  111. 792 bu=2:gosub130:gosub1650:bu=2:gosub160
  112. 794 ifww=1anda$="2"then510
  113. 796 goto770
  114. 800 ifa$<"a"ora$>"l"then770
  115. 810 n=1
  116. 820 c=asc(a$)-64:n(n)=c
  117. 830 poke214,gy(x(c),y(c)):print:printtab(gx(x(c),y(c)))""ci$"[145][157][157]"chr$(192+c)
  118. 840 poke214,gy(x(c),y(c)):print:printtab(gx(x(c),y(c)))ch$"[145][157][157]"chr$(192+c)
  119. 850 geta$:ifa$=""then830
  120. 860 ifa$>="[133]"anda$<="[137]"then940
  121. 870 ifn=1anda$=" "then1260
  122. 880 ifa$=" "then940
  123. 890 ifa$<"a"ora$>"l"then830
  124. 900 poke214,gy(x(c),y(c)):print
  125. 910 printtab(gx(x(c),y(c)))""ci$"[145][157][157]"chr$(192+c)
  126. 920 n=n+1
  127. 930 goto820
  128. 940 ww=1:fori=0to11:ifn(i)=0then960
  129. 950 c=n(i):n(i)=0:i=11
  130. 960 next:n=n-1
  131. 970 ifn<0then770
  132. 980 ifa$=" "then1260
  133. 990 onasc(a$)-132goto1000,1060,1120,1190,1620
  134. 997 :
  135. 998 :rem f1
  136. 999 :
  137. 1000 j=6:fori=0to5:ifgr(i,0)=0thenj=i:i=5
  138. 1010 next:k=0
  139. 1020 ifj=6then770
  140. 1030 sq=0:hq=3:hd=1:gosub190
  141. 1040 ifnthen940
  142. 1050 goto770
  143. 1057 :
  144. 1058 :rem f3
  145. 1059 :
  146. 1060 j=12:fori=6to11:ifgr(i,0)=0thenj=i:i=11
  147. 1070 next:k=0
  148. 1080 ifj=12then770
  149. 1090 sq=0:hq=3:hd=3:gosub190
  150. 1100 ifnthen940
  151. 1110 goto770
  152. 1117 :
  153. 1118 :rem f5
  154. 1119 :
  155. 1120 j=0:fori=6to8:ifgr(i,1)=0thenj=i:i=8:k=1
  156. 1130 next:ifjthen1160
  157. 1140 fori=6to8:ifgr(i,2)=0thenj=i:i=8:k=2
  158. 1150 next:ifj=0then770
  159. 1160 sq=1:hq=gy(0,k):hd=2:gosub190
  160. 1170 ifnthen940
  161. 1180 goto770
  162. 1187 :
  163. 1188 :rem f7
  164. 1189 :
  165. 1190 j=0:fori=9to11:ifgr(i,1)=0thenj=i:i=11:k=1
  166. 1200 next:ifjthen1230
  167. 1210 fori=9to11:ifgr(i,2)=0thenj=i:i=11:k=2
  168. 1220 next:ifj=0then770
  169. 1230 sq=1:hq=gy(0,k):hd=3:gosub190
  170. 1240 ifnthen940
  171. 1250 goto770
  172. 1257 :
  173. 1258 :rem space
  174. 1259 :
  175. 1260 j=6:fori=0to5:ifgr(i,1)=0thenj=i:i=5:k=1
  176. 1270 next:ifj<6then1300
  177. 1280 fori=0to5:ifgr(i,2)=0thenj=i:i=5:k=2
  178. 1290 next:ifj=6then770
  179. 1300 sq=1:hq=gy(0,k):hd=1:gosub190
  180. 1310 ifnthen940
  181. 1320 goto770
  182. 1327 :
  183. 1328 :rem weighing
  184. 1329 :
  185. 1330 bu=1:gosub130
  186. 1340 w1=0:fori=0to5:w1=w1+gr(i,0):next
  187. 1350 w2=0:fori=6to11:w2=w2+gr(i,0):next
  188. 1360 ifw2=w1thengosub260:goto1450
  189. 1370 ifw2>w1then1420
  190. 1380 gosub260:sysdn,1,4,18,6,0
  191. 1390 sysup,21,3,18,6,0
  192. 1400 poke214,7:print:printtab(28)mt$
  193. 1410 goto1450
  194. 1420 gosub260:sysup,1,3,18,6,0
  195. 1430 sysdn,21,4,18,6,0
  196. 1440 poke214,7:print:printtab(8)mt$
  197. 1450 w=w+1:ifw>3then1500
  198. 1470 geta$:ifa$=""then1470
  199. 1480 bu=1:gosub160
  200. 1482 poke214,11:print:printtab(19)nu$(w)
  201. 1490 goto790
  202. 1497 :
  203. 1498 :rem well?
  204. 1499 :
  205. 1500 ms$="[211]o, which is the oddball?":gosub230
  206. 1510 geta$:ifa$<"a"ora$>"l"then1510
  207. 1520 ms$="[193]nd is it light or heavy?  (l/h)":gosub230
  208. 1530 getb$:ifb$<>"l"andb$<>"h"then1530
  209. 1540 ifu<>asc(a$)-65then1600
  210. 1550 ifuu=0andb$="h"then1600
  211. 1560 ifuu=1andb$="l"then1600
  212. 1570 ms$=" [217]ou did it!!! [212]hat's right!":gosub230
  213. 1572 forj=0to2:fori=0to15:syssd+9,iand3:next:next
  214. 1580 geta$:ifa$=""then1580
  215. 1590 goto1620
  216. 1600 ms$="[212]hat's not it. [201]t's "+chr$(u+193)+" - "+v$(uu):gosub230
  217. 1610 geta$:ifa$=""then1610
  218. 1620 ww=0:gosub1650
  219. 1630 goto510
  220. 1647 :
  221. 1648 :rem menu
  222. 1649 :
  223. 1650 bu=0:iff1thengosub160:goto1890
  224. 1660 f1=1:poke53265,11
  225. 1670 print"[147][154]";:
  226. 1680 fori=0to23:printbg$;:next
  227. 1690 printleft$(bg$,39)"[157][148]@"
  228. 1700 print""left$(bg$,34)
  229. 1710 fori=217to242:pokei,peek(i)or128:next
  230. 1720 print"[158][[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]\"
  231. 1730 fori=0to17:print"[158][165]                                  [167]@":next
  232. 1740 print"[158]][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]^@"
  233. 1750 print""left$(bg$,36)
  234. 1760 print"[176][174][176][174][174][174][176][176][174][176][174][176][174][176]\[176][174][146]    [153]chile
  235. 1770 [153]"(NULL)-<(NULL)-<(NULL)(NULL)(NULL)(NULL)(NULL)